﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MMPZ.PZ;
using MMPZ.ENCODE;
namespace PZWJ
{
    public partial class MMPZ : Form
    {

        public MMPZ()
        {
            InitializeComponent();
        }

      private void button1_Click(object sender, EventArgs e)
        {
            //string strServer = OperatorFile.GetIniFileString("DataBase", "Server", "",
            //                                                 Application.StartupPath + "\\SCM.ini");
            string section = "DataBase";
            //配置段
            string key1 = "Server";
            string key2 = "Password";

            //键   
            string inipath = System.Windows.Forms.Application.StartupPath + "\\SCM.ini";
            string value1 = ENCODE.EncryptDES(textBox1.Text, "digiwinw");
            string value2 = ENCODE.EncryptDES(textBox2.Text,"digiwinw");
            OperatorFile.IniWriteValue(section, key1, value1, inipath);
            OperatorFile.IniWriteValue(section, key2, value2, inipath);

            this.Close();
        }

      
    }
}
